package com.taptech.doufu.ui.dialog;

import android.app.Dialog;
import android.content.Context;

import androidx.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;

import com.taptech.doufu.R;
import com.taptech.doufu.ui.activity.YouthModelActivity;

/**
 * author zhangyongcun
 * 16/11/8
 * 更新提示框
 */

public class YouthModelDialog extends Dialog {

    public YouthModelDialog(@NonNull Context context) {
        super(context,R.style.updateDialog);
        View view = LayoutInflater.from(context).inflate(R.layout.dialog_youth_model, null);
        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        setCanceledOnTouchOutside(false);
        addContentView(view,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        View tvJump = view.findViewById(R.id.tvJump);
        tvJump.setOnClickListener(v -> {
            YouthModelActivity.Companion.startActivity(context);
            dismiss();
        });
        View tvClose = view.findViewById(R.id.tvClose);
        tvClose.setOnClickListener(v -> dismiss());
    }


}
